1. Field of Invention
The present invention relates generally to computer services management, and, in particular, to providing asynchronous resumption of a dataflow following a service invocation.
2. Description of Background
Service Oriented Architecture (SOA) is a development of distributed computing and modular programming in which existing or new technologies are grouped into atomic systems. SOAs use software services to build applications. Services are relatively large, intrinsically unassociated units of functionality with externalized service descriptions. In an SOA environment, one or more services communicate with one another by passing data from one service to another, or coordinating an activity between one or more services. In this manner, atomic services can be orchestrated into higher-level services. The architecture defines protocols that describe how services can talk to each other, and independent services can be accessed without knowledge of the underlying platform implementation.
Services are software applications designed to support interoperable machine-to-machine interactions over a network, such as the Internet, and can be executed on local or remote systems hosting the services. Services can provide an SOA implementation in which the basic unit of communication is a message, rather than an operation, by making functional building blocks accessible over standard Internet protocols that are independent from platforms and programming languages. Service requesters may use a variety of protocols and formatting when requesting services from service providers. An Enterprise Service Bus (ESB) can control traffic between the service requesters and providers. The ESB provides mediation of a service request to perform transformation, routing and other operations on a message before it is sent to a target recipient. For example, different protocols or message formats may be encountered when an airline reservation system issues a request for multiple airlines to provide flight information. Mediation can make the protocol and formatting differences appear seamless to the service requesters and providers. The series of mediation activities for a request dataflow or a response dataflow may be implemented in a directed graph of primitive operations. Typically, these operations are synchronous in nature.
In some circumstances it may be necessary to invoke an asynchronous primitive operation as part of the mediation, for example, by invoking an external service to perform the mediation. This is especially true when the original invocation was itself asynchronous or one-way. Mediation is typically performed in a container environment, such as a Java Platform, Enterprise Edition—Enterprise JavaBeans (Java EE EJB) container, which does not permit the creation of new threads and callbacks to handle asynchronous behavior. Existing solutions for container asynchronous behavior rely on higher-level mechanisms (e.g., coupling facility asynchronous beans) that do not fit well into a micro-flow style flow execution runtime environment used to perform mediation in an SOA. One approach to handling an asynchronous primitive operation is to chain multiple mediation flows together manually at design time. However, this approach is cumbersome and time consuming for designers. There are also greater expenses and risks associated with designing and maintaining multiple chained dataflows, as a design change in one dataflow may not be properly handled in the other chained dataflows. Chaining can also result in slower performance, as synchronous primitive operations are forced to wait for responses from asynchronous primitive operations before proceeding.
Therefore, it would be beneficial to develop an approach that enables an asynchronous primitive operation to be invoked as part of a directed graph dataflow, with resumption of the dataflow occurring at the correct point when the asynchronous primitive operation completes. Such an approach should allow the asynchronous primitive operation to be called within a common dataflow containing synchronous primitive operations, presenting a familiar and non-complex experience to the dataflow designer. Accordingly, there is a need in the art for providing asynchronous resumption of a dataflow following a service invocation.